﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Data;

namespace MonitoringIISWebSite.Common
{
    /// <summary>
    /// Classe pour mettre dans ItemsControl.Source
    /// </summary>
    public class DataTableSource : DataTable, IEnumerable
    {
        public System.Collections.Generic.IEnumerator<DataRow> GetEnumerator()
        {
            foreach (DataRow row in this.Rows)
            {
                yield return row;
            }            
        }
        public DataTableSource()
        {
 
        }
        #region IEnumerable Members

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }

        #endregion
    }
}
